<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>用户注册</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 20px;
        }

        h1 {
            text-align: center;
        }

        form {
            width: 400px;
            margin: 0 auto;
        }

        label {
            display: block;
            margin-bottom: 10px;
        }

        input[type="text"],
        input[type="password"],
        input[type="email"] {
            width: 100%;
            padding: 5px;
            margin-bottom: 10px;
        }

        input[type="submit"] {
            width: 100%;
            padding: 10px;
            background-color: #4CAF50;
            color: white;
            border: none;
            cursor: pointer;
        }
    </style>
    <script>
        function showSuccessMessage() {
            alert("注册成功！");
            window.location.href = "/login"; // 将页面重定向到其他页面
        }
    </script>
</head>
<body>
    <h1>用户注册</h1>
    <form action="" method="post" onsubmit="showSuccessMessage()">
        <label for="username">用户名：</label>
        <input type="text" name="username" id="username" required>

        <label for="password">密码：</label>
        <input type="password" name="password" id="password" required>

        <label for="email">电子邮箱：</label>
        <input type="email" name="email" id="email" required>

        <label for="name">姓名：</label>
        <input type="text" name="name" id="name" required>

        <input type="submit" value="注册">
    </form>
</body>
</html>
